JEE trigonometry problem